<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    let students = [
      { name: '蔡徐坤', age: 18, gender: '男', hometown: '美国' },
      { name: '马嘉祺', age: 19, gender: '男', hometown: '菏泽市' },
      { name: '陈彦龙', age: 14, gender: '女', hometown: '河北省' },
      { name: '范丞丞', age: 12, gender: '男', hometown: '曹泽市' }
    ]
    //增加数组对象
    students.push({ name: '鸡哥', age: 18, gender: '男', hometown: '美国佛罗里达州' })
    for (let i = 0; i < students.length; i++) {
      //打印数组对象里面所有的名字
      console.log(students[i].name); //i代表的是数组对象里面的每一个对象
    }


  </script>
</body>

</html>